/*
 * Copyright @ 2024 weili23
 * com.sky.service 17:05
 * All right reserved.
 */

package com.sky.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sky.dto.DishDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.vo.DishVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @desc:
 * @author: weili23
 * @createTime: 2024/10/25 17:05
 * @version: v1.0
 */
public interface DishService extends IService<Dish> {

    /**
     * @desc：保存菜品和口味
     * @author: weili23
     * @params
     * @Date: 2024/10/25 17:06
     * @version: 1.0
     */
    public void saveDishWithFlavor(DishDTO dishDTO);

    /**
     * @desc：分页查询
     * @author: weili23
     * @params
     * @Date: 2024/10/28 10:32
     * @version: 1.0
     */
    Page<DishVO> pageQuery(DishPageQueryDTO dishPageQueryDTO);

    /**
     * @desc：删除
     * @author: weili23
     * @params
     * @Date: 2024/10/28 11:29
     * @version: 1.0
     */
    void deleteDish(String ids);

    /**
     * @desc：根据id查询详情
     * @author: weili23
     * @params
     * @Date: 2024/10/29 9:09
     * @version: 1.0
     */
    /**
     * @desc:
     * @author: weili23
     * @params: a     * @return:
     * @return: null
     * @Date: 2024/10/29 9:59
     * @version: 1.0
     */

    DishVO selectById(String id);


    /**
     * @desc: 修改菜品和口味信息
     * @author: weili23
     * @Date: 2024/10/29 10:07
     * @version: 1.0
     */
    void updateDishWithFlavor(DishDTO dishDTO);

    /**
     * @desc: 起售、停售
     * @author: weili23
     * @Date: 2024/10/29 10:34
     * @version: 1.0
     */
    void onSaleOrStopSale(Long id, Integer status);

    /**
     * @desc:根据分类id查询菜品
     * @author: weili23
     * @Date: 2024/10/29 11:27
     * @version: 1.0
     */
    List<Dish> selectListByGateroyId(Long categoryId);


    /**
     * 条件查询菜品和口味
     * @param dish
     * @return
     */
    List<DishVO> listWithFlavor(Dish dish);
}
